package com.yanqu.road.server.timer.activity;

import com.yanqu.road.server.manger.activity.auto.reward.ActivityAutoRewardMgr;
import com.yanqu.road.utils.LocalDateTimeHelper;
import com.yanqu.road.utils.executor.GeneralTask;

/**
 * @Author wpj
 * @Date 2020/8/27
 */
public class ChargeActivityAutoRewardTask extends GeneralTask {

    private long lastLoadTime = 0;

    @Override
    public void doRun() {
        //每天重新加载活动
        long zeroTime = LocalDateTimeHelper.getZeroTimeTimeStamp();
        if(lastLoadTime < zeroTime ){
            try {
                ActivityAutoRewardMgr.autoSendReward();
                lastLoadTime = zeroTime;
            }catch (Exception e){

            }finally {

            }
        }

    }
}
